Fermat’s Test
نویسنده
چکیده
Fermat’s little theorem says for prime p that ap−1 ≡ 1 mod p for all a 6≡ 0 mod p. A naive extension of this to a composite modulus n ≥ 2 would be: for a 6≡ 0 mod n, an−1 ≡ 1 mod n. Let’s call this “Fermat’s little congruence.” It may or may not be true. When n is prime, it is true for all a 6≡ 0 mod n. But when n is composite it usually has many counterexamples. Example 1.1. When n = 15, the table below shows that for only four a 6≡ 0 mod 15 do we have a14 ≡ 1 mod 15. a 1 2 3 4 5 6 7 8 9 10 11 12 13 14 a14 mod 15 1 4 9 1 10 6 4 4 6 10 1 9 4 1 Example 1.2. Among all the numbers a 6≡ 0 mod 91, 36 of them (less than half) satisfy a90 ≡ 1 mod 91. The situation for small a is shown below. a 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 · · · a90 mod 91 1 64 1 1 64 64 77 64 1 1 64 1 78 14 64 · · · If Fermat’s little congruence an−1 ≡ 1 mod n fails for even one a 6≡ 0 mod n, then n isn’t prime, so it’s composite. For instance, from above 214 6≡ 1 mod 15 and 290 6≡ 1 mod 91, so 15 and 91 are composite. Of course 15 and 91 are small enough that their compositeness can be seen by direct factoring (15 = 3 ·5 and 91 = 7 ·13). The real significance of breaking Fermat’s little congruence is for much larger n, since it lets us prove a large number is composite without having to factor it. This is what we will explore here.
منابع مشابه
Primality Tests Based on Fermat's Little Theorem
In this survey, we describe three algorithms for testing primality of numbers that use Fermat’s Little Theorem.
متن کاملExtension and Generalization of Fermat’s Little Theorem to the Gaussian Integers
It can . . . come as a bit of a shock to meet your first non-obvious theorem, which will typically be Fermat’s Little Theorem. — Dominic Yeo [10] The non-obviousness of Fermat’s Little Theorem is the most interesting part of any introductory number theory course. We are therefore motivated to determine if Fermat’s Little Theorem can be extended to the Gaussian integers, as many other useful pro...
متن کاملFermat’s Last Theorem for Regular Primes
Fermat famously claimed in the margin of a book that a certain family of Diophantine equations have no solutions in integers. For over 300 years Fermat’s claim remained unsolved, and it provided motivation for many important developments in algebraic number theory. We will develop some of the foundational ideas of modern algebraic number theory in the context of Fermat’s Last Theorem, and sketc...
متن کاملKummer’s Special Case of Fermat’s Last Theorem∗
One particularly elegant example of an application of modern algebraic number theory to a classical problem about the integers is found in Kummer’s special case of Fermat’s Last Theorem. In this paper, we reduce Fermat’s Last Theorem to the question of whether or not there exist integer solutions to xp + yp = zp for p an odd prime. We then give a thorough exposition of Kummer’s proof that no su...
متن کاملA polytime proof of correctness of the Rabin-Miller algorithm from Fermat's little theorem
Although a deterministic polytime algorithm for primality testing is now known ([4]), the Rabin-Miller randomized test of primality continues being the most efficient and widely used algorithm. We prove the correctness of the Rabin-Miller algorithm in the theory V for polynomial time reasoning, from Fermat’s little theorem. This is interesting because the Rabin-Miller algorithm is a polytime ra...
متن کامل